@extends('layouts.default')

@section('title','更新个人资料')
@section('content')
 <div class="col-md-offset-2 col-md-8">
   <div class="panel panel-default">
     <div class="panel-heading">
       <h5>更新个人资料</h5>
     </div>
      <div class="panel-body">
        @include('shared._errors')
        <div class="gravatar_edit">
          <a href="http://gravatar.com/email" target="_blank">
             <img src="{{$user->gravatar('200')}}" alt="{{$user->name}}" class="gravatar"/>
           </a>

        </div>
        <form  action="{{route('users.update',$user->id)}}" method="post">
          {{ method_field('PATCH')}}
          {{ csrf_field()}}
          <div class="from-group">
            <label for="name">名称:</label>
            <input type="text" name="name" class="form-control" value="{{ $user->name}}">
          </div>
          <div class="from-group">
            <label for="name">邮箱:</label>
            <input type="text" name="name" class="form-control" value="{{ $user->email}}">
          </div>
          <div class="from-group">
            <label for="name">密码:</label>
            <input type="password" name="password" class="form-control" value="{{old('password')}}">
          </div>
          <div class="from-group">
            <label for="name">确认密码:</label>
            <input type="password" name="password_confirmation" class="form-control" value="{{old('password_confirmation')}}">
          </div>
          <button type="submit" class="btn btn-primary "name="button">更新</button>
        </form>

      </div>

   </div>

 </div>

@stop
